Solution to Exercise 3
Solution to exercise 3.
We'll cover the following
Solution#
Again, the solution will work without using the alias for COUNT(Emp_Id)
.
Explanation#
The query has two requirements: first, fetch the project-wise count and then sort the result by that count. For a project-wise count, we will be using the COUNT() function to count the number of employees that have been grouped together using the GROUP BY clause. Lastly, for sorting, we will use the ORDER BY clause on the alias of the employee-count.
The slides below help to visualize the solution:
1 of 2
Exercise 3
Exercise 4
Mark as Completed
Report an Issue